package com.huibur.devicecheck.controller;

import com.huibur.devicecheck.model.param.SysParamsParam;
import com.huibur.devicecheck.model.po.SysParamsPO;
import com.huibur.devicecheck.model.query.DeviceQuery;
import com.huibur.devicecheck.model.vo.DeviceVO;
import com.huibur.devicecheck.request.ListRes;
import com.huibur.devicecheck.request.ObjRes;
import com.huibur.devicecheck.request.PageRes;
import com.huibur.devicecheck.service.IDeviceService;
import com.huibur.devicecheck.service.ISysParamsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.text.ParseException;

/*******************************************************
* @title: RemindController.java
* @description:
* @author wushiqi
* @date 2021/10/14
* @version 1.0
*******************************************************/
@RestController
@RequestMapping("/reminds")
@Api(value = "提醒管理（提醒巡检员任务）",tags = {"提醒管理（提醒巡检员任务）"})
@Slf4j
public class RemindController {

    @Autowired
    IDeviceService iDeviceService;
    @Autowired
    ISysParamsService iSysParamsService;

    /**
     * 获取某个巡检员的当前月份未检查设备
     * @param userId
     * @return
     */
    @GetMapping("/selectDevice/{userId}")
    @ApiOperation(value = "获取某个巡检员的当前月份未检查设备",response = ListRes.class)
    public ListRes<DeviceVO> selectDeviceListByUserId(@PathVariable Long userId) throws ParseException {
        return new ListRes<DeviceVO>().data(iDeviceService.selectDeviceListByUserId(userId));
    }
}
